Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
Regards
Group: DynoMotion |
Message: 2188 |
From: himykabibble |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Tom,
So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> Â
> (CMD,SetPersistDec99 3)
> Â
> Regards
> TK
>
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 6:46 AM
> Subject: [DynoMotion] Step Pulleys and Spindle Speed
>
>
> Â
> I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
>
> Regards,
> Ray L.
>
|
|
Group: DynoMotion |
Message: 2189 |
From: Tom Kerekes |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Hi Ray,
Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
In this case you actually don't need any M code program at all. Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP. But I think all we need is to get the MCode down to KFLOP. If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
So in summary:
Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
Regarding your earlier question: All the UserData Vars are available for user use. But you must coordinate all the User programs in your system to not collide.
For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
Hope this helps.
TK
Group: DynoMotion |
Message: 2190 |
From: himykabibble |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Tom,
That helps a lot. I've got the pulleys and pwm all working properly now. Thanks!
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> Â
> In this case you actually don't need any M code program at all. Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP. But I think all we need is to get the MCode down to KFLOP. If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> Â
> Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> Â
> So in summary:
> Â
> Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> Â
> Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> Â
> Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> Â
> Regarding your earlier question: All the UserData Vars are available for user use. But you must coordinate all the User programs in your system to not collide.
> Â
> For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> Â
> Hope this helps.
> Â
> TK
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 5:48 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
> Â
> Tom,
>
> So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > ÃÂ
> > (CMD,SetPersistDec99 3)
> > ÃÂ
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 6:46 AM
> > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> >
> >
> > ÃÂ
> > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 2191 |
From: himykabibble |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Tom,
Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> Â
> In this case you actually don't need any M code program at all. Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP. But I think all we need is to get the MCode down to KFLOP. If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> Â
> Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> Â
> So in summary:
> Â
> Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> Â
> Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> Â
> Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> Â
> Regarding your earlier question: All the UserData Vars are available for user use. But you must coordinate all the User programs in your system to not collide.
> Â
> For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> Â
> Hope this helps.
> Â
> TK
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 5:48 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
> Â
> Tom,
>
> So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > ÃÂ
> > (CMD,SetPersistDec99 3)
> > ÃÂ
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 6:46 AM
> > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> >
> >
> > ÃÂ
> > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 2192 |
From: himykabibble |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Never mind - I got it.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> > Â
> > In this case you actually don't need any M code program at all. Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP. But I think all we need is to get the MCode down to KFLOP. If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> > Â
> > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> > Â
> > So in summary:
> > Â
> > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> > Â
> > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> > Â
> > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> > Â
> > Regarding your earlier question: All the UserData Vars are available for user use. But you must coordinate all the User programs in your system to not collide.
> > Â
> > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> > Â
> > Hope this helps.
> > Â
> > TK
> > Â
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 5:48 PM
> > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> >
> >
> > Â
> > Tom,
> >
> > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > > ÃÂ
> > > (CMD,SetPersistDec99 3)
> > > ÃÂ
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, November 11, 2011 6:46 AM
> > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > >
> > >
> > > ÃÂ
> > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2193 |
From: Tom Kerekes |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Hi Ray,
Actually that does appear to be an issue/feature/bug. If no name is specified then the Thread is still commanded to execute. The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute. However there is a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory . So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
So in summary: it is probably better to specify a "Null" program with an empty main() for those MCodes.
Regards
TK
Group: DynoMotion |
Message: 2194 |
From: himykabibble |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Tom,
OK. Is Persist.UserData initialized to some known value on power-up? Is there a way to save data across power cycles? I'd like to preserve the pulley selection through a power cycle if possible.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Actually that does appear to be an issue/feature/bug. If no name is specified then the Thread is still commanded to execute. The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute.  However there is a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory . So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
> Â
> So in summary: it is probably better to specify a "Null" program with an empty main() for those MCodes.
> Â
> Regards
> TKÂ
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 7:20 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
> Â
> Never mind - I got it.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> > > ÃÂ
> > > In this case you actually don't need any M code program at all.ÃÂ Normally KMotionCNC itself puts the MCode number into the specified persist variable beforeÃÂ launching the MCode program in KFLOP.ÃÂ ButÃÂ I think all we need is to get the MCode down to KFLOP.ÃÂ If you Specify the "Action" as "Execute" but leave the name blank it willÃÂ still download the MCode but not launch any KFLOP Program.
> > > ÃÂ
> > > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> > > ÃÂ
> > > So in summary:
> > > ÃÂ
> > > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> > > ÃÂ
> > > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> > > ÃÂ
> > > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> > > ÃÂ
> > > Regarding your earlier question: All the UserData Vars are available for user use.ÃÂ But you must coordinate all the User programs in your system to not collide.
> > > ÃÂ
> > > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> > > ÃÂ
> > > Hope this helps.
> > > ÃÂ
> > > TK
> > > ÃÂ
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, November 11, 2011 5:48 PM
> > > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> > >
> > >
> > > ÃÂ
> > > Tom,
> > >
> > > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃÂ
> > > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > > > ÃâÃÂ
> > > > (CMD,SetPersistDec99 3)
> > > > ÃâÃÂ
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, November 11, 2011 6:46 AM
> > > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > > >
> > > >
> > > > ÃâÃÂ
> > > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2195 |
From: Tom Kerekes |
Date: 11/11/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
Hi Ray,
The persist.UserData is cleared on power up (unless the User Memory is Flashed - which we don't recommend unless you are running stand alone without a PC).
We don't currently have a mechanism for non-volatile data.
Regards
TK
Group: DynoMotion |
Message: 2196 |
From: himykabibble |
Date: 11/12/2011 |
Subject: Re: Step Pulleys and Spindle Speed |
This is pretty cool! I hooked it up to the machine using my laptop this afternoon, and everything pretty much worked on the first try with both KMotionCNC and Mach3 - spindle controls (CW/CCW & PWM), coolant controls, all axes, and tool length comp using the knee all work perfectly. Next step is moving all the software onto the machines PC, and getting the pendant and probing working, both of which should be pretty simple at this point.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> The persist.UserData is cleared on power up (unless the User Memory is Flashed - which we don't recommend unless you are running stand alone without a PC).
> Â
> We don't currently have a mechanism for non-volatile data.
> Â
> Regards
> TK
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 7:52 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
> Â
> Tom,
>
> OK. Is Persist.UserData initialized to some known value on power-up? Is there a way to save data across power cycles? I'd like to preserve the pulley selection through a power cycle if possible.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > Actually that does appear to be an issue/feature/bug.ÃÂ If no name is specified then the Thread is still commanded to execute.ÃÂ The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute.ÃÂ ÃÂ However there isÃÂ a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory .ÃÂ So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
> > ÃÂ
> > So in summary: it is probably better toÃÂ specify a "Null" program with an empty main() for those MCodes.
> > ÃÂ
> > Regards
> > TKÃÂ
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 7:20 PM
> > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> >
> >
> > ÃÂ
> > Never mind - I got it.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃÂ
> > > > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> > > > ÃâÃÂ
> > > > In this case you actually don't need any M code program at all.ÃâàNormally KMotionCNC itself puts the MCode number into the specified persist variable beforeÃâàlaunching the MCode program in KFLOP.ÃâàButÃâàI think all we need is to get the MCode down to KFLOP.ÃâàIf you Specify the "Action" as "Execute" but leave the name blank it willÃâàstill download the MCode but not launch any KFLOP Program.
> > > > ÃâÃÂ
> > > > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> > > > ÃâÃÂ
> > > > So in summary:
> > > > ÃâÃÂ
> > > > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> > > > ÃâÃÂ
> > > > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> > > > ÃâÃÂ
> > > > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> > > > ÃâÃÂ
> > > > Regarding your earlier question: All the UserData Vars are available for user use.ÃâàBut you must coordinate all the User programs in your system to not collide.
> > > > ÃâÃÂ
> > > > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> > > > ÃâÃÂ
> > > > Hope this helps.
> > > > ÃâÃÂ
> > > > TK
> > > > ÃâÃÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, November 11, 2011 5:48 PM
> > > > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > (CMD,SetPersistDec99 3)
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, November 11, 2011 6:46 AM
> > > > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
| | | | | | | |